-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Project option: REPLACE_IGNITION_INCLUDE_PATH #190
Conversation
I'm trying to migrate sdformat to ign-cmake, I found that there are a few more things which are not compatible
I haven't gotten around to migrating tests and docs yet, I will report more issues as I find them. |
I'd like to see if reviewers are ok with this PR as is in its partially useful state or if they want to try to address all of this at. once cc @adlarkin |
Thanks @scpeters and @koonpeng for the things you've discovered so far! Regarding how to proceed with addressing the issues mentioned above, I think we can take the following approach:
Having separate, smaller PRs that focus on solving one issue in particular will make the review process easier, and also give us a better way to track changes being made. If there are no objections to the approach I've suggested, then this PR will need to be broken into 2 PRs because right now, this PR solves part of point 1 (searched include directories) and point 2 above. If help is needed in creating more PRs that solve the remaining issues found by @koonpeng, let me know, and I can help open a few. |
I've split that feature out from this PR into #191 I can rebase this branch after that is merged, if that is not too presumptuous |
The include paths are now configurable and default to ignition/${IGN_DESIGNATION} to match existing behavior. Signed-off-by: Steve Peters <[email protected]>
787cebd
to
4f40889
Compare
I've added a checklist in gazebosim/sdformat#181 (comment) with an additional entry for the prefix to the macros in Export.hh |
Signed-off-by: Steve Peters <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Just a few nits about grammar before merging
Signed-off-by: Steve Peters <[email protected]>
diff --git a/cmake/ign_auto_headers.hh.in b/cmake/ign_auto_headers.hh.in
index 42fc964..a078c63 100644
--- a/cmake/ign_auto_headers.hh.in
+++ b/cmake/ign_auto_headers.hh.in
@@ -19,5 +19,5 @@
// This file is automatically generated by CMake. Changes should instead be
// made to cmake/ign_auto_headers.hh.in in ignition-cmake
-#include <ignition/@IGN_DESIGNATION@/config.hh>
+#include <@PROJECT_INCLUDE_DIR@/config.hh>
${ign_headers} Fixes |
Sorry to jump in a bit late.
|
Signed-off-by: Steve Peters <[email protected]>
Use variable in pkg-config templates. Signed-off-by: Steve Peters <[email protected]>
nice catch! fixed in 7c12783 |
I'll go with |
Signed-off-by: Steve Peters <[email protected]>
changed in 6c2ffe5. It's easy to change the name now, so please speak up now if you have a better idea; it won't hurt my feelings |
The change looks good to me, thanks! Since the internal variable was there before I think is fine to leave as it is. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ready to go. It would be great if we can write a Changelog entry in this PR but can done at releasing time.
Confirm location of auto-generated headers by including them from AlmostEmpty.cc Signed-off-by: Steve Peters <[email protected]>
6787937: I've added the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Newest changes LGTM, thanks for iterating @scpeters!
It would be great if we can write a Changelog entry in this PR but can done at releasing time.
+1
This pull request has been mentioned on Gazebo Community. There might be relevant details there: https://community.gazebosim.org/t/new-ignition-releases-2022-01-10/1228/1 |
* Add REPLACE_IGNITION_INCLUDE_PATH option to IgnConfigureProject. The include paths are now configurable and default to ignition/${IGN_DESIGNATION} to match existing behavior. * Use ign_install_all_headers in example Confirm location of auto-generated headers by including them from AlmostEmpty.cc * Use IGN_INCLUDE_INSTALL_DIR_POSTFIX in templates Signed-off-by: Steve Peters <[email protected]>
🎉 New feature
Helps with gazebosim/sdformat#181
Summary
Currently all cmake projects that use
IgnConfigureProject
are required to use include paths that start withignition/${IGN_DESIGNATION}
(i.e.ignition/math
,ignition/transport
). We would like to useign-cmake2
withlibsdformat
, but its cmake project name and include paths don't follow this pattern. This pull request adds an option toIgnConfigureProject
to allow more flexibility:INCLUDE_DIR
: option to specify the project include paths, as an alternative toignition/${IGN_DESIGNATION}
Test it
Look at the
examples/no_ignition_prefix
folder and build withcmake .. -DBUILDSYSTEM_TESTING=ON && make -j
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge